package com.test;

import com.alibaba.fastjson.JSON;
import com.xnf.model.common.dtos.ResponseResult;
import com.xnf.model.search.dtos.UserSearchDto;
import com.xnf.search.SearchApplication;
import com.xnf.search.service.ApUserSearchService;
import com.xnf.search.service.ArticleSearchService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * Created by chendx on 2022/4/2.
 */
@SpringBootTest(classes = SearchApplication.class)
@RunWith(SpringRunner.class)
public class Demo {

    @Autowired
    private ArticleSearchService articleSearchService;
    @Autowired
    private ApUserSearchService apUserSearchService;

    @Test
    public void test(){
        UserSearchDto userSearchDto = new UserSearchDto();
        userSearchDto.setEquipmentId(1);
        userSearchDto.setSearchWords("IT");
        apUserSearchService.delUserSearch(userSearchDto);
    }

    @Test
    public void test1(){
        UserSearchDto userSearchDto =new UserSearchDto();
        ResponseResult userSearch = apUserSearchService.findUserSearch(userSearchDto);
        System.out.println(JSON.toJSONString(userSearch));
    }
}
